Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create text descriptions for e2e tests - Closes #1516 #1523

Merged
merged 7 commits into from
Dec 4, 2018

Conversation

Efefefef
Copy link
Contributor

What issue have I solved?

-- #1516

How have I implemented/fixed it?

extracted selectors to separate file
created textual descriptions for test

How has this been tested?

Review checklist

@Efefefef Efefefef requested a review from slaweet November 27, 2018 14:04
@Efefefef Efefefef self-assigned this Nov 27, 2018
@Efefefef Efefefef force-pushed the 1516-create-text-descriptions branch from 49a6344 to b1ec74d Compare November 27, 2018 15:26
@slaweet slaweet changed the base branch from 1.7.0 to 1.8.0 November 29, 2018 16:22
Copy link
Contributor

@osvaldovega osvaldovega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general the changes that I mentioned are related the way the comment was wrote, in some cases I am not able to understand what you what to say and in others I better use a better explanation.
In the other hand is great

/**
* 5 transaction are shown in the latest activity
* @expect 5 transactions
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plase try write something more easy to understand like display 5 transaction in the last activity page or component, it is ok but something easy to understand will be better

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like Andrei's description form, but agree it could say latest activity component/module

* Click on transaction row leads to tx details page
* @expect url
* @expect some specific to page element is present on it
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, like go to details page when a row is being click in this page or component

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think both descriptions (Andrei's and Osvaldo's) are the same clear.

/**
* Scrolling down triggers loading another portion of txs
* @expect more txs are present
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here like, load more transactions when scroll is placed in the bottom of the page.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, same amount of clearness to me.

* Maximum possible number of voted accounts is shown
* @expect 101 are shown
*/
it('Shows 101 votes', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too, like Display the maximum amount of voted delegates (101)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too :-) Andrei's passive tense is fine.

/**
* Shows voted delegate's nickname not addresses
* @expect delegate's nickname shown
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change this too, for be honest I think I know what you meant to say but dont understand for be honest so, I dont know how should be display

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be better English. What about Shows voted delegate's nickname, not address?

/**
* Shows who-voted-for-this-delegate's nickname if it was delegate
* @expect voters nickname shown
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment is hard to understand can you please change it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand what is meant by who-voted-for-this-delegate and why the dashes, but I also get that it's not clear to anyone. What about the following?
Shows nickname of account on "Who voted for this delegate?" list if the account is a delegate

/**
* Shows who-voted-for-this-delegate's address if it was not-delegate
* @expect voters address shown
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as this is a comment you can remove the dash, and maybe if possible put something more descriptive

* @expect transaction appears in the activity list in the confirmed state with valid details
* @expect header balance value is decreased
*/
it('Register delegate + Header balance is affected', function () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please mention what are the steps of the process instead of process?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. The steps can be described either in the comment above or inside the it

* Search functioning correctly
* @expect no delegates are shown if search for non-existing name
* @expect delegate is shown in 1 row when is found
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for this I dont understand what exactly means

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Efefefef please ask @osvaldovega what is he missing here.

/**
* ?showNetwork parameter makes network switcher available
* @expect network switcher is visible
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you missed a typo **?**showNetwork

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's on purpose as url param

* Click on transaction row leads to tx details page
* @expect url
* @expect some specific to page element is present on it
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think both descriptions (Andrei's and Osvaldo's) are the same clear.

/**
* 5 transaction are shown in the latest activity
* @expect 5 transactions
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like Andrei's description form, but agree it could say latest activity component/module

/**
* Scrolling down triggers loading another portion of txs
* @expect more txs are present
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, same amount of clearness to me.

* Maximum possible number of voted accounts is shown
* @expect 101 are shown
*/
it('Shows 101 votes', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too :-) Andrei's passive tense is fine.

@@ -124,44 +137,53 @@ describe('Dashboard Activity', () => {
describe(testSet.name, () => {
beforeEach(() => {
cy.autologin(accounts.delegate.passphrase, networks.devnet.node);
testSet.open();
waitBeforeChangeTabAfterLoading();
cy.get(ss.delegateStatisticsTab).click();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The testing talk at React Day was talking about not doing this - each it should contain the setup, if it's repetitive like this, create a helper function and call it in it.

/**
* Shows voted delegate's nickname not addresses
* @expect delegate's nickname shown
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be better English. What about Shows voted delegate's nickname, not address?

/**
* Shows who-voted-for-this-delegate's nickname if it was delegate
* @expect voters nickname shown
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand what is meant by who-voted-for-this-delegate and why the dashes, but I also get that it's not clear to anyone. What about the following?
Shows nickname of account on "Who voted for this delegate?" list if the account is a delegate

* @expect transaction appears in the activity list in the confirmed state with valid details
* @expect header balance value is decreased
*/
it('Register delegate + Header balance is affected', function () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. The steps can be described either in the comment above or inside the it

* Search functioning correctly
* @expect no delegates are shown if search for non-existing name
* @expect delegate is shown in 1 row when is found
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Efefefef please ask @osvaldovega what is he missing here.

/**
* ?showNetwork parameter makes network switcher available
* @expect network switcher is visible
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's on purpose as url param

@Efefefef
Copy link
Contributor Author

Efefefef commented Dec 4, 2018

@osvaldovega I use passive voice to stress on the assertion that is the essence of the test.
For example, I would prefer 'The pie is eaten' on 'Eat the pie' because it's not clear what actual result we are actually testing in the second case. The test could check if 'my throat is safe' since there were no needles inside, but the process still would be 'Eat the pie'. So the goal of the description is to show the idea of what is being checked behind this very test, having in mind it might not be particularly clear from steps done in the test and answer questions like ' can I assert some different fields? ' / 'can I reorder steps in some way ?' and keep the idea, not making the test useless

Copy link
Contributor

@slaweet slaweet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Andrei

@slaweet slaweet dismissed osvaldovega’s stale review December 4, 2018 14:35

Changes implemented

@Efefefef Efefefef merged commit dd6ba39 into 1.8.0 Dec 4, 2018
@Efefefef Efefefef deleted the 1516-create-text-descriptions branch December 4, 2018 15:48
@slaweet slaweet changed the title Create text descriptions - Closes #1516 Create text descriptions for e2e tests - Closes #1516 Dec 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants